package com.jh.user.pojo;

import org.hibernate.validator.constraints.NotBlank;

import java.io.Serializable;
import java.util.Objects;

public class CongMingChannelRequest implements Serializable {
    private static final long serialVersionUID = -1773235149856251685L;
    /** 通道标识 */
    @NotBlank(message = "渠道标识不能为空！")
    private String channelTag;

    /** 传到通道的参数, 集成的商家类的 */
    @NotBlank(message = "渠道参数不能为空！")
    private String channelParam;

    /** 通道商家标号 */
    @NotBlank(message = "渠道商家标号不能为空！")
    private String channelNo;

    /** 通道名字 */
    @NotBlank(message = "渠道名称不能为空！")
    private String name;

    /** 通道状态0:关闭；1：正常使用； */
    @NotBlank(message = "渠道状态不能为空！")
    private String status;

    /** 子通道名字 */
    @NotBlank(message = "子渠道名称不能为空！")
    private String subName;

    /** 描述 */
    @NotBlank(message = "通道备注不能为空！")
    private String remarks;

    /** 通道费率 */
    @NotBlank(message = "通道费率不能为空！")
    private String rate = "0";

    public String getChannelTag() {
        return channelTag;
    }

    public void setChannelTag(String channelTag) {
        this.channelTag = channelTag;
    }

    public String getChannelParam() {
        return channelParam;
    }

    public void setChannelParam(String channelParam) {
        this.channelParam = channelParam;
    }

    public String getChannelNo() {
        return channelNo;
    }

    public void setChannelNo(String channelNo) {
        this.channelNo = channelNo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getSubName() {
        return subName;
    }

    public void setSubName(String subName) {
        this.subName = subName;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getRate() {
        return rate;
    }

    public void setRate(String rate) {
        this.rate = rate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof CongMingChannelRequest)) return false;
        CongMingChannelRequest that = (CongMingChannelRequest) o;
        return getChannelTag() == that.getChannelTag() &&
                Objects.equals(getChannelParam(), that.getChannelParam()) &&
                Objects.equals(getChannelNo(), that.getChannelNo()) &&
                Objects.equals(getName(), that.getName()) &&
                Objects.equals(getStatus(), that.getStatus()) &&
                Objects.equals(getSubName(), that.getSubName()) &&
                Objects.equals(getRemarks(), that.getRemarks()) &&
                Objects.equals(getRate(), that.getRate());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getChannelTag(), getChannelParam(), getChannelNo(), getName(), getStatus(), getSubName(), getRemarks(), getRate());
    }

    @Override
    public String toString() {
        return "CongMingChannelRequest{" +
                "channelTag=" + channelTag +
                ", channelParam='" + channelParam + '\'' +
                ", channelNo='" + channelNo + '\'' +
                ", name='" + name + '\'' +
                ", status='" + status + '\'' +
                ", subName='" + subName + '\'' +
                ", remarks='" + remarks + '\'' +
                ", rate=" + rate +
                '}';
    }
}
